package cn.edu.service.impl;

import cn.edu.dao.StudentDao;
import cn.edu.dao.impl.StudentDaoImpl;
import cn.edu.pojo.Student;
import cn.edu.service.StudentService;

public class StudentServiceImpl implements StudentService {
    StudentDao studentDao = new StudentDaoImpl();
    @Override
    public void registUser(Student student) {
        studentDao.savaStudent(student);
    }

    @Override
    public void login(Student student) {

    }

    @Override
    public boolean existSno(String sno) {
        Student student = studentDao.queryStudentBySno(sno);
        return student==null?false:true;
    }

    @Override
    public Student queryStudentBySnoAndPassword(String sno, String password) {
        return studentDao.queryStudentBySnoAndPassword(sno,password);
    }
}
